<include file="Public/head"/>
<link href="__PUBLIC__/qwadmin/css/shen/shen.css" rel="stylesheet" type="text/css" />
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
<style>
#xuanxiang button{
    margin:30px 45px;
    width:100px;
    height:50px;
}
</style>
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }

    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
                <div style="width:100%;">
                    <div  style="width:300px;height:250px;border:1px solid #ccc;box-shadow:1px 1px 15px #ccc;margin: 50px 50px; float:left;" class="che">
                        <div class="dao" style="background-color:#E88103;">选择车辆信息</div>  <!-- 导航头 -->
                        <ul>
                            <li  onclick="sche()"><button class="btn-info" >申请派车</button></li>

                        </ul>
                    


                </div>  
                <!--油卡列表 ENG-->
              


            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/layer/layer.js"></script>
<script src="__PUBLIC__/jquery-1.7.2.min.js"></script>
<script src="__PUBLIC__/js/laydate/laydate.js"></script>
                <div id="xuanxiang" style="display:none;">
                    <button class="btn-info" onclick="nei()">市内派车</button>
                    <!-- <button class="btn-warning" onclick="lao()">劳保用品</button> -->
                    <button class="btn-success" onclick="wai()">市外派车</button>
    
                </div>
<script>





// // ------------------------------------------申请派车 
function sche()
{
    layer.open({
    type: 1,
    title:  ['申请派车', 'font-size:20px;'],
    skin: 'demo-class', //加上边框
    area: ['400px', '160px'], //宽高
    // content: $('#sc'),
    content: $('#xuanxiang'),
    // btn:'按钮'
    });
}

function nei()
{
    layer.open({
    type: 1,
    title:  ['申请市内派车', 'font-size:20px;'],
    skin: 'demo-class', //加上边框
    area: ['600px', '600px'], //宽高
    // content: $('#sc'),
    content: $('#sc'),
    // btn:'按钮'
    });
}

function wai()
{
    layer.open({
    type: 1,
    title:  ['申请市外派车', 'font-size:20px;'],
    skin: 'demo-class', //加上边框
    area: ['600px', '600px'], //宽高
    // content: $('#sc'),
    content: $('#sw'),
    // btn:'按钮'
    });
}

function scshen()
{

     //询问框
        layer.confirm('确定发起申请么,(ง •̀_•́)ง？', {
          btn: ['确定','取消'] //按钮
        }, function(){
            $.ajax({
                 type: "POST",
                 url:"{:U('Shen/cheadd')}",
                 data:$('#scformID').serialize(),// 要提交的表单 
                 success: function(msg) {
                    if (msg == 1111) {
                        layer.msg('已提交,请等待审批!', {icon: 1});
                        history.go(0); 
                    }else{
                        layer.msg('申请失败,请重新再试!');
                    }
                 }
            });
         
        }, function(){
            layer.msg(' (｡・`ω´･) 再见');
        });

     // $.ajax({
     //     type: "POST",
     //     url:"{:U('Shen/cheadd')}",
     //     data:$('#scformID').serialize(),// 要提交的表单 
     //     success: function(msg) {
     //       if (msg == 1111) {
     //            layer.confirm('确定申请么？', {
     //            btn: ['确定'] //按钮
     //        }, function(){
     //            layer.msg('已提交,请等待审批!', {icon: 1});
     //        }, function(){
     //            layer.msg('已取消', {
     //            time: 20000, //20s后自动关闭
     //            // btn: ['明白了', '知道了']
     //        });
     //        });
     //        }else{
     //            layer.msg('申请失败,请重新再试!');
     //        }
     //     }
     // });
}
function swshen()
{
     $.ajax({
         type: "POST",
         url:"{:U('Shen/cheadd')}",
         data:$('#swformID').serialize(),// 要提交的表单 
         success: function(msg) {
           if (msg == 1111) {
                layer.confirm('确定申请么？', {
                btn: ['确定'] //按钮
            }, function(){
                layer.msg('已提交,请等待审批!', {icon: 1});
                history.go(0); 
            }, function(){
                layer.msg('已取消', {
                time: 20000, //20s后自动关闭
                // btn: ['明白了', '知道了']
            });
            });
            }else{
                layer.msg('申请失败,请重新再试!');
            }
         }
     });
}

// // ------------------------------------------申请派车 END











</script>



<!-- ---------------------------申请市内派车------------------------------ -->
<div id="sc" style="display:none;">
    <form action="" id='scformID'>
        <input type="hidden" name="type" value="1">
        <!-- <div class="row"> -->
       
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">出发地点:</b></label>
            <input type="text" class="form-control" name="c_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">到达地点:</b></label><br><br>
            <input type="text" class="form-control"  name="d_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">            
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车时间:</b></label><br><br>
            <input onClick="laydate()" name="k_time" style="margin-left:-20px;">&nbsp&nbsp &nbsp &nbsp &nbsp <b>至</b> &nbsp<input onClick="laydate()" name="e_time">
        </div><br>
        <input type="hidden" name="type" value="1">
       <!--  <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">共计天数:</b></label>
            <input type="text" class="form-control" name="day" id="exampleInputEmail1" placeholder="请输入天数...." style="width:90%;">
        </div><br> -->
         <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车缘由:</b></label>
            <textarea class="form-control" rows="3" name="content" style="width:90%;margin-left:30px;" placeholder="请输入缘由...."></textarea>
        </div>
                           
                            

        <div onclick="scshen()" style="width:100px;height:30px;background-color:#FFA500;border:1px solid #ccc;border-radius:50px;text-align:center;line-height:30px;color:#fff;float:left; bottom: 0;margin-left:42%;margin-top:5%;cursor:pointer;"><b>申请</b></div>
        <!-- </div>　 -->
    </form>
</div>
<!-- ---------------------------申请市内派车   END------------------------------ -->

<!-- ---------------------------申请市外派车------------------------------ -->
<div id="sw" style="display:none;">
    <form action="" id='swformID'>
        <input type="hidden" name="type" value="1">
        <!-- <div class="row"> -->
       
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">出发地点:</b></label>
            <input type="text" class="form-control" name="c_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">到达地点:</b></label><br><br>
            <input type="text" class="form-control"  name="d_place" id="exampleInputEmail1" placeholder="请输入地点...." style="width:90%;">            
        </div><br>
        <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车时间:</b></label><br><br>
            <input onClick="laydate()" name="k_time" style="margin-left:-20px;">&nbsp&nbsp &nbsp &nbsp &nbsp <b>至</b> &nbsp<input onClick="laydate()" name="e_time">
        </div><br>
        <input type="hidden" name="type" value="2">
       <!--  <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">共计天数:</b></label>
            <input type="text" class="form-control" name="day" id="exampleInputEmail1" placeholder="请输入天数...." style="width:90%;">
        </div><br> -->
         <div class="form-group yyy" >
            <label for="exampleInputEmail1"><b style="font-size:17px;">用车缘由:</b></label>
            <textarea class="form-control" rows="3" name="content" style="width:90%;margin-left:30px;" placeholder="请输入缘由...."></textarea>
        </div>
                           
                            

        <div onclick="swshen()" style="width:100px;height:30px;background-color:#FFA500;border:1px solid #ccc;border-radius:50px;text-align:center;line-height:30px;color:#fff;float:left; bottom: 0;margin-left:42%;margin-top:5%;cursor:pointer;"><b>申请</b></div>
        <!-- </div>　 -->
    </form>
</div>
<!-- ---------------------------申请市外派车   END------------------------------ -->














</body>
</html>
